<section class="metadata-prompt">
  <header class="metadata-prompt__header">
    <p>
      Compliance Purge Policy

      {{more-info
        link="http://go/gdpr/deletions/purgePolicies"
        tooltip="Click for more information Purge Policies"
      }}
    </p>
  </header>
</section>

<ul class="purge-policy-list">
  {{#if isEditable}}

    {{#each-in purgePolicyProps as |purgeType prop|}}
      <li
        class="purge-policy-list__item {{unless (contains purgeType supportedPurgePolicies)
                                                'purge-policy-list__item--disabled'}}">

        {{#radio-button-composer
          name="dataset-purge-policy"
          value=(if (contains purgeType supportedPurgePolicies) purgeType null)
          disabled=(if (contains purgeType supportedPurgePolicies) false true)
          groupValue=(readonly purgePolicy)
          changed=(action "onChange")
        }}
          {{prop.displayAs}}
        {{/radio-button-composer}}

        {{#unless (contains purgeType supportedPurgePolicies)}}
          <p class="purge-policy-list__availability">
            Purge policy not available for <span class="purge-policy-list__platform--unavailable">
            {{platform}}</span>
          </p>
        {{/unless}}

        <p>{{prop.desc}}</p>

        {{#if (and requestExemptionReason (eq purgeType exemptPolicy))}}

          {{medium-content-editable
            value=purgeNote
            options=editorOptions
            class="comment-new__content"}}

        {{/if}}
      </li>
    {{/each-in}}

  {{else}}

    {{#if purgePolicy}}
      <li class="purge-policy-list__item">
        <strong>
          {{get (get purgePolicyProps purgePolicy) "displayAs"}}
        </strong>
      </li>
    {{else}}

      <p>{{missingPolicyText}}</p>
      <sub>To update, click edit and follow the steps</sub>

    {{/if}}
  {{/if}}
</ul>
